import request from '@/utils/request';

//初始化表格数据
export function getData(data) {
    return request({
        url: '/shop/notice/page',
        method: 'get',
        headers: {
            "authorization": localStorage.getItem("token")
        },
        params: data
    })
}
// 编辑请求信息
export function edit(id, data) {
    return request({
        url: "/shop/notice/info/" + id,
        method: "get",
        headers: {
            "authorization": localStorage.getItem("token")
        },
        params: data
    })
}
//编辑确定
export function editTrue(data) {
    return request({
        url: "/shop/notice",
        method: "put",
        headers: {
            "authorization": localStorage.getItem("token")
        },
        data
    })
}
//删除
export function del(id, data) {
    return request({
        url: "/shop/notice/" + id,
        method: "DELETE",
        headers: {
            "authorization": localStorage.getItem("token")
        },
        data
    })
}
// 增加
export function add(data) {
    return request({
        url: "/shop/notice",
        method: "POST",
        headers: {
            "authorization": localStorage.getItem("token")
        },
        data
    })
}


